<template>
  <div class="admin-dashboard">
      <el-container>
        <el-main>
            <component :is="currentComponent"></component>
        </el-main>
      </el-container>
  </div>
</template>

<script setup>
import { ref } from 'vue';
import UserSelfManagement from '../components/UserSelfManagement.vue';

// 动态组件映射
const components = {
  userSelfManagement: UserSelfManagement,
};

// 当前菜单和动态组件
const activeMenu = ref('userSelfManagement');
const currentComponent = ref(components.userSelfManagement);

// 菜单切换逻辑
const handleMenuSelect = (menu) => {
  currentComponent.value = components[menu];
};

</script>


<style scoped>
.admin-dashboard {
  display: flex;
  height: 100vh;
}

</style>

